import numpy as np
import torch
import open3d as o3d

x = torch.arange(10).reshape(10,-1).repeat(1,3).numpy()
y = torch.arange(10).reshape(10,-1).repeat(1,3).numpy() + 0.01

source_cloud = o3d.geometry.PointCloud()
source_cloud.points = o3d.utility.Vector3dVector(x)
target_cloud = o3d.geometry.PointCloud()
target_cloud.points = o3d.utility.Vector3dVector(y)
trans_matrix = np.identity(4)
threshold = 0.05
evaluation = o3d.pipelines.registration.evaluate_registration(source_cloud, target_cloud, threshold, trans_matrix)
correspondence = np.array(evaluation.correspondence_set)  # shape(10, 2) 每行存储两个对应点的下标
print(correspondence)

print(evaluation)
